refactor(guides): move cycle-attachment content to inter-canister-calls#243
refactor(guides): move cycle-attachment content to inter-canister-calls#243marc0olo wants to merge 5 commits into
Conversation
|
🤖 Here's your preview: https://kwnd6-zaaaa-aaaam-ai7va-cai.icp0.io |
|
Code review: one CLI command error found. All Motoko and Rust examples are correct:
Fix needed: The icp new proxy --template proxyThe correct flag is icp new proxy --subfolder proxyVerified against |
- Fix --template -> --subfolder flag on icp new (per cli reference) - Extend accepting-cycles example to require a specific fee and accept exactly that amount; excess is returned to the caller automatically
|
Feedback addressed:
|
|
Re-reviewed after the follow-up commit. All examples are correct: CLI fix: Improved callee pattern: the new fee-based accept is correct on both sides.
All Motoko/Rust imports, anchor links, and the |
Summary
## Calling canisters that require cyclessection out of the cycles-management guide and into inter-canister-calls as a new## Calls with attached cyclessection. Attaching cycles to a call is a call mechanic, not an operational management concern.### Accepting cycles in your canistersubsection (which was under "Topping up canisters") to the same new section, since it is the callee-side of the same mechanic.Cycles.add<system>()imperative style to the current(with cycles = amount)parenthetical syntax, and updates the Rust examples from the low-levelmsg_cycles_addcall to.with_cycles()on theCallbuilder — consistent with how the rest ofinter-canister-calls.mdxis written.### Charging a cycle feeand the example function tocompute()returning(), making clear that cycles are payment for work rather than the subject of the function.icp new proxy --template proxy→icp new proxy --subfolder proxy(no--templateflag exists; verified against.sources/icp-cli/docs/reference/cli.md). The bug was present in the original section and carried over during the move.cycles-management.mdpointing to the new location.concepts/cycles.md(×2),guides/chain-fusion/exchange-rates.mdx(×2).Sync recommendation
hand-writtenCloses #231